package com.bw.demo_lazy_fragment.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter

/**
 * @Author : ZhouZiYao
 * @Time : On 2023/11/20 10:35
 * @Description :
 */
class FragmentAdapter(private val fragmentList: List<Fragment>, private val fm: FragmentManager, private val behavior: Int): FragmentStatePagerAdapter(fm,behavior) {
    override fun getCount(): Int {
        return fragmentList.size
    }

    override fun getItem(position: Int): Fragment {
        return fragmentList[position]
    }
}